package com.cc.mapper;

import com.cc.entity.EmployeeAttendance;
import com.cc.entity.Employees;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author yuton
* @description 针对表【employees(员工基本信息表)】的数据库操作Mapper
* @createDate 2025-05-29 16:56:39
* @Entity com.cc.entity.Employees
*/
public interface EmployeesMapper {

    //查询所有员工人数
    int selectAllCount();
    //根据员工工号查询员工信息(包括该员工的社保信息)
    Employees selectByEmployeeNo(String employeeNo);
    //根据员工姓名(模糊查询)/所属部门ID查询员工列表
    List<Employees> getEmployeesByNameOrDept(@Param("name") String name, @Param("departmentId") Integer departmentId);
    //查询所有员工考勤的次数(按次数倒序排列),只要返回员工工号、员工姓名、考勤的次数
    List<EmployeeAttendance> getEmployeeAttendanceCounts();
    //删除离职状态员工的考勤记录
    int deleteEmployeeAttendanceByStatus(Integer status);
    //根据员工工号查询员工信息(包括该员工的考勤记录)
    Employees selectByEmployeeNoWithAttendance( String employeeNo);
    //新建员工
    int insertEmployees(Employees employees);
}
